package com.example.bankend.mapper;



import com.example.bankend.model.chatmessage;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChatMessageMapper {
    @Insert("INSERT INTO chat_messages(content, sender) VALUES(#{content}, #{sender})")
    void insert(chatmessage message);

    @Select("SELECT * FROM chat_messages")
    List<chatmessage> selectAll();
}